import HttpHandler from "@/handler/HttpHandler"
import {addParamsForPath} from '@/utils/xhrPathTurn'
export default class FlowManageApi {
  constructor() {
    this.http = new HttpHandler()
  }
  // 获取流程部署列表(分页)
  list(data){
    let url = '/workflow/deployProcess/list'
    return this.http.post(url, data)
  }
  // 映射模型
  mapping(data){
    let url = '/workflow/deployProcess/mapping'
    return this.http.post(addParamsForPath(url, data))
  }
  //   挂起部署的流程
  suspend(data){
    let url = '/workflow/deployProcess/suspend'
    return this.http.post(addParamsForPath(url, data))
  }
  // 激活部署的流程
  active(data){
    let url = '/workflow/deployProcess/active'
    return this.http.post(addParamsForPath(url, data))
  }
  //   打包下载
  downloadZip(data){
    let url = '/workflow/deployProcess/downloadZip'
    return this.http.post(addParamsForPath(url, data))
  }
  // 删除已部署的流程
  delete(data){
    let url = '/workflow/deployProcess/delete'
    return this.http.post(addParamsForPath(url, data))
  }
}
